/**
 * 
 */
package com.study.test;

import static org.junit.Assert.*;

import javax.annotation.Resource;


import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.study.entity.GatewayHandlerEntity;
import com.study.service.HandlerEntityService;

/**
 * @author Administrator
 * @date 2019年5月15日
 */
public class SpringMybatisTest2 {

	private static Logger logger = LoggerFactory.getLogger(SpringMybatisTest2.class);
			
	private HandlerEntityService handlerEntityService = null;
 
	@Before
	public void setUp() throws Exception {
		ApplicationContext ctx=new ClassPathXmlApplicationContext("spring-mybaits.xml");
		handlerEntityService=ctx.getBean(HandlerEntityService.class);
	}
 
	@After
	public void tearDown() throws Exception {
	}
 
	@Test
	public void test() {
		System.out.println(113);
		assertNotNull(handlerEntityService);
		GatewayHandlerEntity user = handlerEntityService.getById(16);
		logger.info(user.toString());
	}
	
}
